Skip to content

gh-131178: Add tests for calendar command-line interface - #159045

Closed
JohnnyWilson16 wants to merge 1 commit into
python:mainfrom
JohnnyWilson16:fix-gh-131178-calendar-cli-tests
Closed

JohnnyWilson16 wants to merge 1 commit into
python:mainfrom
JohnnyWilson16:fix-gh-131178-calendar-cli-tests

Conversation

@JohnnyWilson16

Copy link
Copy Markdown

Related to gh-131178.

Adds command-line interface tests for the calendar module (Lib/test/test_calendar.py), covering:

  • Default year invocation (current year)
  • Specific year ([year]) and month ([year] [month])
  • Text formatting options (-w/--width, -l/--lines, -s/--spacing, -m/--months)
  • First weekday flag (-f/--first-weekday)
  • HTML output mode (-t/--type html, -c/--css)
  • Encoding (-e/--encoding)
  • Error conditions (invalid month, --locale without --encoding, unknown option)
  • Help output (-h/--help)
  • In-process execution via calendar.main

@bedevere-app bedevere-app Bot added the type-feature A feature request or enhancement label Oct 9, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Oct 9, 2026
7 of 9 tasks
@bedevere-app bedevere-app Bot added awaiting review tests Tests in the Lib/test dir labels Oct 9, 2026
Comment thread Lib/test/test_calendar.py
3, self.cal.cssclass_year_head, 2017), self.cal.formatyear(2017))


class CommandLineTest(unittest.TestCase):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but thsi just duplicates the existing tests:

class CommandLineTestCase(unittest.TestCase):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review tests Tests in the Lib/test dir type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants